<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="java.util.*"%>
 <jsp:useBean id="loginTeacherForm" scope="session"
	class="mypack.form.LoginTeachersForm" />
<jsp:useBean id="selectTeaAction" scope="session"
	class="mypack.action.SelectTeaAction" />
<jsp:useBean id="loginTeaVo" scope="session"
	class="mypack.vo.LoginTeachersVo" />
    <%
    loginTeacherForm.setParameters(request, response);
%>
<%
selectTeaAction.service(request, response, loginTeacherForm,
		loginTeaVo);
%>
<%request.setCharacterEncoding("utf-8"); %>
<%response.setCharacterEncoding("utf-8"); %>


<html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=uft-8">
<title>作业列表</title>
 <!-- 新 Bootstrap 核心 CSS 文件 -->
			<link rel="stylesheet" href="static/css/bootstrap.min.css">
            <!-- 可选的Bootstrap主题文件（一般不用引入） -->
			<link rel="stylesheet" href="static/css/bootstrap-theme.min.css">

            <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
			<script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>

			<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
			<script src="static/js/bootstrap.min.js"></script>
            
            <link href="static/css/homepage.css" rel="stylesheet" type="text/css" />
</head>
<%           
             if(request.getSession().getAttribute("check_code") != null){
            	out.println(request.getSession().getAttribute("check_code"));
%>
	<body>
	<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
            <div id = "banner">
                <ul class="nav nav-tabs" role="tablist">
                    <li role="presentation" class="active" style="color:#44484F;"><a href="http://localhost:8080/Final/index.jsp">首页</a></li>
                    <li role="presentation" ><a href="#" style="color:#44484F;">教师入口</a></li>
                    <li role="presentation"><a href="#" style="color:#44484F;">学生入口</a></li>
                    <li role="presentation"><a href="#" style="color:#44484F;">注销登录</a></li>
					<li role="presentation"><a href="#" style="color:#44484F;">修改密码</a></li>
                </ul>
            </div> 
            </nav>    
<br>
<br>
<br>
<br>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
            <div id = "banner">
                <ul class="nav nav-tabs" role="tablist">
                    <li role="presentation" class="active" style="color:#44484F;"><a href="http://localhost:8080/Final/index.jsp">首页</a></li>
                    <li role="presentation" ><a href="#" style="color:#44484F;">教师入口</a></li>
                    <li role="presentation"><a href="#" style="color:#44484F;">学生入口</a></li>
                    <li role="presentation"><a href="#" style="color:#44484F;">注销登录</a></li>
					<li role="presentation"><a href="#" style="color:#44484F;">修改密码</a></li>
                </ul>
            </div> 
            </nav>  
<br>
		<h3 style="margin-left:140px;">
			请选择任课老师
		</h3>
		
		<br>
			<table border="1" style="width:80%;margin-left:140px;" class="table table-striped">
	<tr>
			<td width="20%">老师编号</td>
			<td width="50%">老师姓名</td>
			<td width="50%">操作</td>
		</tr>
		
		<% 
		  
			for (int i = 0; i < loginTeaVo.getStudents().size(); i++) {
		%>
		<tr>
			<td><%=loginTeaVo.getStudents().get(i).getTid()%></td>
			<td><%=loginTeaVo.getStudents().get(i).getTname()%></td>
			
			<td>
			<FORM action=query_homeworks.jsp method="POST">
	   
	   <input type="hidden" size="0" name="tname" value=<%=loginTeaVo.getStudents().get(i).getTid() %>>
	    
		<input class="btn btn-primary btn-lg" role="button" type=submit value="查询作业">

</form>

<%} %>
</td>
		
			
			
			
		</tr>
		
	</table>
		<% 
}
            else{
            	out.print( " <a href='http://localhost:8080/Final/index.jsp'>请登录</a>");
            }
%>
    <div id="leftContainer"> 
                    <p class = "copyright">Copyright © Sidan Yao. All rights reserved. </p>
					<p class = "copyrightE">     Email:1013748619@qq.com</p>
					
                </div>

	</body>
</html>
